home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / include / Ecore_Fb.h < prev    next >
Encoding:
C/C++ Source or Header  |  2006-01-09  |  3.9 KB  |  121 lines

  1. #ifndef _ECORE_FB_H
  2. #define _ECORE_FB_H
  3.  
  4. #ifdef EAPI
  5. #undef EAPI
  6. #endif
  7. #ifdef WIN32
  8. # ifdef BUILDING_DLL
  9. #  define EAPI __declspec(dllexport)
  10. # else
  11. #  define EAPI __declspec(dllimport)
  12. # endif
  13. #else
  14. # ifdef __GNUC__
  15. #  if __GNUC__ >= 4
  16. #   define EAPI __attribute__ ((visibility("default")))
  17. #  else
  18. #   define EAPI
  19. #  endif
  20. # else
  21. #  define EAPI
  22. # endif
  23. #endif
  24.  
  25. /**
  26.  * @file
  27.  * @brief Ecore frame buffer system functions.
  28.  */
  29.  
  30. /* FIXME:
  31.  * maybe a new module?
  32.  * - code to get battery info
  33.  * - code to get thermal info
  34.  */
  35.  
  36. #ifdef __cplusplus
  37. extern "C" {
  38. #endif
  39.  
  40. EAPI extern int ECORE_FB_EVENT_KEY_DOWN; /**< FB Key Down event */
  41. EAPI extern int ECORE_FB_EVENT_KEY_UP; /**< FB Key Up event */
  42. EAPI extern int ECORE_FB_EVENT_MOUSE_BUTTON_DOWN; /**< FB Mouse Down event */
  43. EAPI extern int ECORE_FB_EVENT_MOUSE_BUTTON_UP; /**< FB Mouse Up event */
  44. EAPI extern int ECORE_FB_EVENT_MOUSE_MOVE; /**< FB Mouse Move event */
  45.  
  46. typedef struct _Ecore_Fb_Event_Key_Down          Ecore_Fb_Event_Key_Down; /**< FB Key Down event */
  47. typedef struct _Ecore_Fb_Event_Key_Up            Ecore_Fb_Event_Key_Up; /**< FB Key Up event */
  48. typedef struct _Ecore_Fb_Event_Mouse_Button_Down Ecore_Fb_Event_Mouse_Button_Down; /**< FB Mouse Down event */
  49. typedef struct _Ecore_Fb_Event_Mouse_Button_Up   Ecore_Fb_Event_Mouse_Button_Up; /**< FB Mouse Up event */
  50. typedef struct _Ecore_Fb_Event_Mouse_Move        Ecore_Fb_Event_Mouse_Move; /**< FB Mouse Move event */
  51.  
  52. struct _Ecore_Fb_Event_Key_Down /** FB Key Down event */
  53. {
  54.    char   *keyname; /**< The name of the key that was pressed */
  55.    char   *keysymbol; /**< The logical symbol of the key that was pressed */
  56.    char   *key_compose; /**< The UTF-8 string conversion if any */
  57. };
  58.    
  59. struct _Ecore_Fb_Event_Key_Up /** FB Key Up event */
  60. {
  61.    char   *keyname; /**< The name of the key that was released */
  62.    char   *keysymbol; /**< The logical symbol of the key that was pressed */
  63.    char   *key_compose; /**< The UTF-8 string conversion if any */
  64. };
  65.    
  66. struct _Ecore_Fb_Event_Mouse_Button_Down /** FB Mouse Down event */
  67. {
  68.    int     button; /**< Mouse button that was pressed (1 - 32) */
  69.    int     x; /**< Mouse co-ordinates when mouse button was pressed */
  70.    int     y; /**< Mouse co-ordinates when mouse button was pressed */
  71.    int     double_click : 1; /**< Set if click was a double click */
  72.    int     triple_click : 1; /**< Set if click was a triple click  */
  73. };
  74.    
  75. struct _Ecore_Fb_Event_Mouse_Button_Up /** FB Mouse Up event */
  76. {
  77.    int     button; /**< Mouse button that was released (1 - 32) */
  78.    int     x; /**< Mouse co-ordinates when mouse button was raised */
  79.    int     y; /**< Mouse co-ordinates when mouse button was raised */
  80. };
  81.    
  82. struct _Ecore_Fb_Event_Mouse_Move /** FB Mouse Move event */ 
  83. {
  84.    int     x; /**< Mouse co-ordinates where the mouse cursor moved to */
  85.    int     y; /**< Mouse co-ordinates where the mouse cursor moved to */
  86. };
  87.  
  88. EAPI int    ecore_fb_init(const char *name);
  89. EAPI int    ecore_fb_shutdown(void);
  90.    
  91. EAPI void   ecore_fb_double_click_time_set(double t);
  92. EAPI double ecore_fb_double_click_time_get(void);
  93.  
  94. EAPI void   ecore_fb_size_get(int *w, int *h);   
  95.    
  96. EAPI void   ecore_fb_touch_screen_calibrate_set(int xscale, int xtrans, int yscale, int ytrans, int xyswap);
  97. EAPI void   ecore_fb_touch_screen_calibrate_get(int *xscale, int *xtrans, int *yscale, int *ytrans, int *xyswap);
  98.  
  99. EAPI void   ecore_fb_backlight_set(int on);
  100. EAPI int    ecore_fb_backlight_get(void);
  101.  
  102. EAPI void   ecore_fb_backlight_brightness_set(double br);
  103. EAPI double ecore_fb_backlight_brightness_get(void);
  104.  
  105. EAPI void   ecore_fb_led_set(int on);
  106. EAPI void   ecore_fb_led_blink_set(double speed);
  107.  
  108. EAPI void   ecore_fb_contrast_set(double cr);
  109. EAPI double ecore_fb_contrast_get(void);
  110.  
  111. EAPI double ecore_fb_light_sensor_get(void);
  112.  
  113. EAPI void ecore_fb_callback_gain_set(void (*func) (void *data), void *data);
  114. EAPI void ecore_fb_callback_lose_set(void (*func) (void *data), void *data);
  115.        
  116. #ifdef __cplusplus
  117. }
  118. #endif
  119.  
  120. #endif
  121.